package main

import (
	"fmt"
	"github.com/shirou/gopsutil/v3/cpu"
	"github.com/shirou/gopsutil/v3/disk"
	"github.com/shirou/gopsutil/v3/docker"
	"github.com/shirou/gopsutil/v3/host"
	"github.com/shirou/gopsutil/v3/load"
	"github.com/shirou/gopsutil/v3/mem"
	"github.com/shirou/gopsutil/v3/process"
	"net"
	"time"
)

func main() {
	c, _ := cpu.Info()
	fmt.Println(c)
	d, _ := disk.Usage("/")
	fmt.Println(d)
	ds, _ := docker.GetDockerStat()
	fmt.Println(ds)
	dl, _ := docker.GetDockerIDList()
	fmt.Println(dl)
	h, _ := host.Info()
	fmt.Println(h)
	a, _ := load.Avg()
	fmt.Println(a)
	m, _ := load.Misc()
	fmt.Println(m)
	ia, _ := net.InterfaceAddrs()
	fmt.Println(ia)
	i, _ := net.Interfaces()
	fmt.Println(i)
	v, _ := mem.VirtualMemory()
	fmt.Println(v)
	pids, _ := process.Pids()
	fmt.Println(pids)
	p, _ := process.NewProcess(58633)
	fmt.Println(p.CPUPercent())
	fmt.Println(p.Connections())
	fmt.Println(p.NumThreads())

	time.Sleep(time.Hour)

}
